package com.clouddot.baipai.model;


import android.content.Context;

import com.clouddot.baipai.contract.IAttendFragmentContract;
import com.clouddot.baipai.http.BanPaiRetrofitHelper;
import com.clouddot.baipai.http.entity.response.getClassRecordResponse;
import com.clouddot.baipai.http.entity.response.getRecordByIdResponse;
import com.clouddot.baipai.infrastructure.environment.Env;

import org.wxy.sdk.base.impl.BaseModelImpl;

import java.util.ArrayList;

import rx.Observable;

public class AttendFragmentModel extends BaseModelImpl implements IAttendFragmentContract.IModel {
    public AttendFragmentModel(Context context) {
        super(context);

    }
    

    @Override
    public Observable<getRecordByIdResponse> getStudentAttendRecord(String acttype, int pageindex, int pagesize) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getStudentAttendRecord(Env.getAppContext().IP,acttype,pageindex,pagesize);
    }

    @Override
    public Observable<ArrayList<getClassRecordResponse>> getClassAttendRecord(String acttype, String classId) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getClassAttendRecord(Env.getAppContext().IP,acttype,classId);
    }
}
